package com.hushao.lims.weblims.service;

import com.hushao.lims.weblims.domain.DepartmentInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * @author 930588706
 * @date 18/2/3
 */
public interface DepartmentService {
    /**
     * 根据名称模糊查询院部集合
     * @param departmentName
     * @param pageable
     * @return
     */
    Page<DepartmentInfo> listDepartmentByName(String departmentName, Pageable pageable);

    /**
     * 根据ID查找院部
     * @param departmentId
     * @return
     */
    DepartmentInfo getById(Integer departmentId);

    /**
     * 删除院部
     * @param departmentId
     * @throws Exception
     */
    void remove(Integer departmentId) throws Exception;

    /**
     * 修改或增加院部
     * @param department
     * @param teacherNumber
     * @return
     * @throws Exception
     */
    String saveOrUpdate(DepartmentInfo department, String teacherNumber)throws Exception;

    /**
     *根据名称查找院部
     * @param departmentName
     * @return
     */
    DepartmentInfo getByName(String departmentName);
}
